import request from '@/utils/request'

//新能源车辆列表
export function fetchList(query) {
  return request({
    url: '/newEnergyCar/list',
    method: 'post',
    data: query
  })
}

//删除新能源车辆
export function deleteNewEnergyCar(id) {
  return request({
    url: '/newEnergyCar/delete/' + id,
    method: 'post',
  })
}

//创建新能源车辆
export function createNewEnergyCar(query) {
  return request({
    url: '/newEnergyCar/create',
    method: 'post',
    data: query
  })
}

//更新新能源车辆
export function updateNewEnergyCar(query) {
  return request({
    url: '/newEnergyCar/update',
    method: 'post',
    data: query
  })
}


//新能源车辆详情
export function newEnergyCarDetail(id) {
  return request({
    url: '/newEnergyCar/' + id,
    method: 'get',
  })
}